import config from '../config/config';
import request from '../utils/request';

let service = {};

// 2.12.0获取专题列表
service.getspecialtype = (param, cb) => {
  param = param || {};
  let requestUrl = config.api.getspecialtype;
  request({
    url: requestUrl,
    showLoading: true,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    }
  });
}

// 2.12.0获取专题下属列表
service.getspecialList = (param, cb) => {
  param = param || {};
  let requestUrl = config.api.getspecialList;
  request({
    url: requestUrl,
    showLoading: true,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    }
  });
}

// 2.22.0浏览商品增加抽奖次数
service.invitedsign = (param, cb) => {
  param = param || {};
  let requestUrl = config.api.invitedsign;
  request({
    url: requestUrl,
    showLoading: false,
    data: param,
    method: 'GET',
    success: res => {
      cb(res);
    }
  });
}
module.exports = service;